From 781fbb086ed84cc46923eab5930edddf156b3fbc Mon Sep 17 00:00:00 2001
From: Andrew Eikum <aeikum@codeweavers.com>
Date: Tue, 28 Aug 2018 12:57:32 -0500
Subject: [PATCH] ntdll,server: Never use CLOCK_MONOTONIC_RAW

Using CLOCK_MONOTONIC avoids a kernel call.
---
 dlls/ntdll/time.c | 2 +-
 server/request.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c
index e2cd770af0..05c9fa8b26 100644
--- a/dlls/ntdll/time.c
+++ b/dlls/ntdll/time.c
@@ -114,7 +114,7 @@ static ULONGLONG monotonic_counter(void)
     return mach_absolute_time() * timebase.numer / timebase.denom / 100;
 #elif defined(HAVE_CLOCK_GETTIME)
     struct timespec ts;
-#ifdef CLOCK_MONOTONIC_RAW
+#if 0
     if (!clock_gettime( CLOCK_MONOTONIC_RAW, &ts ))
         return ts.tv_sec * (ULONGLONG)TICKSPERSEC + ts.tv_nsec / 100;
 #endif
diff --git a/server/request.c b/server/request.c
index 83e8ac012a..f8b597b7db 100644
--- a/server/request.c
+++ b/server/request.c
@@ -526,7 +526,7 @@ unsigned int get_tick_count(void)
     return mach_absolute_time() * timebase.numer / timebase.denom / 1000000;
 #elif defined(HAVE_CLOCK_GETTIME)
     struct timespec ts;
-#ifdef CLOCK_MONOTONIC_RAW
+#if 0
     if (!clock_gettime( CLOCK_MONOTONIC_RAW, &ts ))
         return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
 #endif
 
From c74573c68c98508801eac6607dad153155b9a625 Mon Sep 17 00:00:00 2001
From: Tk-Glitch <ti3nou@gmail.com>
Date: Fri, 14 Jun 2019 19:13:52 +0200
Subject: kernel32: Never use CLOCK_MONOTONIC_RAW

This is an addition for 13e11d3 to Andrew Eikum's patch for ntdll and server

Signed-off-by: Tk-Glitch <ti3nou@gmail.com>

diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c
index 737affcb38..f82d33c876 100644
--- a/dlls/kernel32/time.c
+++ b/dlls/kernel32/time.c
@@ -82,7 +82,7 @@ static inline ULONGLONG monotonic_counter(void)
     return mach_absolute_time() * timebase.numer / timebase.denom / 100;
 #elif defined(HAVE_CLOCK_GETTIME)
     struct timespec ts;
-#ifdef CLOCK_MONOTONIC_RAW
+#if 0
     if (!clock_gettime( CLOCK_MONOTONIC_RAW, &ts ))
         return ts.tv_sec * (ULONGLONG)TICKSPERSEC + ts.tv_nsec / 100;
 #endif
